var mongoose = require("../db.js");
var schema = mongoose.Schema; //模型生成器(表生成器)

//建立表 并且指定字段
var leaveSchema = new schema({
    userid:String,
    username:String,
    reason:String,
    start:Date,
    end:Date,
    extend:String,//附件
    type:Number//请假的状态
});

//转成数据模型导出
module.exports = mongoose.model("leave", leaveSchema);